*/
/**
- * SECTION:gtkconstraint
- * @Title: GtkConstraint
- * @Short_description: The description of a constraint
+ * GtkConstraint:
*
* `GtkConstraint` describes a constraint between an attribute on a widget
* and another attribute on another widget, expressed as a linear equation.
*
- * For instance:
+ * The typical equation for a constraint is:
*
* ```
- * target.attr1 = source.attr2 × multiplier + constant
+ * target.target_attr = source.source_attr × multiplier + constant
* ```
*
* Each `GtkConstraint` is part of a system that will be solved by a
gobject_class->finalize = gtk_constraint_finalize;
/**
- * GtkConstraint:target:
+ * GtkConstraint:target: (attributes org.gtk.Property.get=gtk_constraint_get_target)
*
* The target of the constraint.
*
* The constraint will set the #GtkConstraint:target-attribute of the
* target using the #GtkConstraint:source-attribute of the source
* widget.
+ *
+ *
*/
obj_props[PROP_TARGET] =
g_param_spec_object ("target",
G_PARAM_STATIC_STRINGS |
G_PARAM_CONSTRUCT_ONLY);
/**
- * GtkConstraint:target-attribute:
+ * GtkConstraint:target-attribute: (attributes org.gtk.Property.get=gtk_constraint_get_target_attribute)
*
* The attribute of the #GtkConstraint:target set by the constraint.
*/
G_PARAM_STATIC_STRINGS |
G_PARAM_CONSTRUCT_ONLY);
/**
- * GtkConstraint:relation:
+ * GtkConstraint:relation: (attributes org.gtk.Property.get=gtk_constraint_get_relation)
*
* The order relation between the terms of the constraint.
*/
G_PARAM_STATIC_STRINGS |
G_PARAM_CONSTRUCT_ONLY);
/**
- * GtkConstraint:source:
+ * GtkConstraint:source: (attributes org.gtk.Property.get=gtk_constraint_get_source)
*
* The source of the constraint.
*
- * The constraint will set the #GtkConstraint:target-attribute of the
- * target using the #GtkConstraint:source-attribute of the source.
+ * The constraint will set the [property@Gtk.Constraint:target-attribute]
+ * of the target using the [property@Gtk.Constraint:source-attribute]
+ * of the source.
*/
obj_props[PROP_SOURCE] =
g_param_spec_object ("source",
G_PARAM_STATIC_STRINGS |
G_PARAM_CONSTRUCT_ONLY);
/**
- * GtkConstraint:source-attribute:
+ * GtkConstraint:source-attribute: (attributes org.gtk.Property.get=gtk_constraint_get_source_attribute)
*
- * The attribute of the #GtkConstraint:source read by the constraint.
+ * The attribute of the [property@Gtk.Constraint:source] read by the
+ * constraint.
*/
obj_props[PROP_SOURCE_ATTRIBUTE] =
g_param_spec_enum ("source-attribute",
G_PARAM_STATIC_STRINGS |
G_PARAM_CONSTRUCT_ONLY);
/**
- * GtkConstraint:multiplier:
+ * GtkConstraint:multiplier: (attributes org.gtk.Property.get=gtk_constraint_get_multiplier)
*
- * The multiplication factor to be applied to the
- * #GtkConstraint:source-attribute.
+ * The multiplication factor to be applied to
+ * the [property@Gtk.Constraint:source-attribute].
*/
obj_props[PROP_MULTIPLIER] =
g_param_spec_double ("multiplier",
G_PARAM_STATIC_STRINGS |
G_PARAM_CONSTRUCT_ONLY);
/**
- * GtkConstraint:constant:
+ * GtkConstraint:constant: (attributes org.gtk.Property.get=gtk_constraint_get_constant)
*
- * The constant value to be added to the #GtkConstraint:source-attribute.
+ * The constant value to be added to the [property@Gtk.Constraint:source-attribute].
*/
obj_props[PROP_CONSTANT] =
g_param_spec_double ("constant",
G_PARAM_STATIC_STRINGS |
G_PARAM_CONSTRUCT_ONLY);
/**
- * GtkConstraint:strength:
+ * GtkConstraint:strength: (attributes org.gtk.Property.get=gtk_constraint_get_strength)
*
* The strength of the constraint.
*
* The strength can be expressed either using one of the symbolic values
- * of the #GtkConstraintStrength enumeration, or any positive integer
+ * of the [enum@Gtk.ConstraintStrength] enumeration, or any positive integer
* value.
*/
obj_props[PROP_STRENGTH] =
}
/**
- * gtk_constraint_new:
- * @target: (nullable) (type GtkConstraintTarget): a #GtkConstraintTarget
- * @target_attribute: the attribute of @target to be set
- * @relation: the relation equivalence between @target_attribute and @source_attribute
- * @source: (nullable) (type GtkConstraintTarget): a #GtkConstraintTarget
- * @source_attribute: the attribute of @source to be read
- * @multiplier: a multiplication factor to be applied to @source_attribute
- * @constant: a constant factor to be added to @source_attribute
+ * gtk_constraint_new: (constructor)
+ * @target: (nullable) (type GtkConstraintTarget): the target of the constraint
+ * @target_attribute: the attribute of `target` to be set
+ * @relation: the relation equivalence between `target_attribute` and `source_attribute`
+ * @source: (nullable) (type GtkConstraintTarget): the source of the constraint
+ * @source_attribute: the attribute of `source` to be read
+ * @multiplier: a multiplication factor to be applied to `source_attribute`
+ * @constant: a constant factor to be added to `source_attribute`
* @strength: the strength of the constraint
*
- * Creates a new #GtkConstraint representing a relation between a layout
+ * Creates a new constraint representing a relation between a layout
* attribute on a source and a layout attribute on a target.
*
- * Returns: the newly created #GtkConstraint
+ * Returns: (transfer full): the newly created constraint
*/
GtkConstraint *
gtk_constraint_new (gpointer target,
}
/**
- * gtk_constraint_new_constant:
- * @target: (nullable) (type GtkConstraintTarget): a #GtkConstraintTarget
- * @target_attribute: the attribute of @target to be set
- * @relation: the relation equivalence between @target_attribute and @constant
- * @constant: a constant factor to be set on @target_attribute
+ * gtk_constraint_new_constant: (constructor)
+ * @target: (nullable) (type GtkConstraintTarget): a the target of the constraint
+ * @target_attribute: the attribute of `target` to be set
+ * @relation: the relation equivalence between `target_attribute` and `constant`
+ * @constant: a constant factor to be set on `target_attribute`
* @strength: the strength of the constraint
*
- * Creates a new #GtkConstraint representing a relation between a layout
+ * Creates a new constraint representing a relation between a layout
* attribute on a target and a constant value.
*
- * Returns: the newly created #GtkConstraint
+ * Returns: (transfer full): the newly created constraint
*/
GtkConstraint *
gtk_constraint_new_constant (gpointer target,
}
/**
- * gtk_constraint_get_target:
- * @constraint: a #GtkConstraint
+ * gtk_constraint_get_target: (attributes org.gtk.Method.get_property=target)
+ * @constraint: a `GtkConstraint`
*
- * Retrieves the #GtkConstraintTarget used as the target for @constraint.
+ * Retrieves the [iface@Gtk.ConstraintTarget] used as the target for
+ * the constraint.
*
- * If the #GtkConstraint:target property is set to %NULL, the @constraint
- * will use the #GtkConstraintLayout's widget.
+ * If the targe is set to `NULL` at creation, the constraint will use
+ * the widget using the [class@Gtk.ConstraintLayout] as the target.
*
* Returns: (transfer none) (nullable): a #GtkConstraintTarget
*/
}
/**
- * gtk_constraint_get_target_attribute:
- * @constraint: a #GtkConstraint
+ * gtk_constraint_get_target_attribute: (attributes org.gtk.Method.get_property=target-attribute)
+ * @constraint: a `GtkConstraint`
*
- * Retrieves the attribute of the target to be set by the @constraint.
+ * Retrieves the attribute of the target to be set by the constraint.
*
* Returns: the target's attribute
*/
}
/**
- * gtk_constraint_get_source:
+ * gtk_constraint_get_source: (attributes org.gtk.Method.get_property=source)
* @constraint: a #GtkConstraint
*
- * Retrieves the #GtkConstraintTarget used as the source for @constraint.
+ * Retrieves the [iface@Gtk.ConstraintTarget] used as the source for the
+ * constraint.
*
- * If the #GtkConstraint:source property is set to %NULL, the @constraint
- * will use the #GtkConstraintLayout's widget.
+ * If the source is set to `NULL` at creation, the constraint will use
+ * the widget using the [class@Gtk.ConstraintLayout] as the source.
*
- * Returns: (transfer none) (nullable): a #GtkConstraintTarget
+ * Returns: (transfer none) (nullable): the source of the constraint
*/
GtkConstraintTarget *
gtk_constraint_get_source (GtkConstraint *constraint)
}
/**
- * gtk_constraint_get_source_attribute:
- * @constraint: a #GtkConstraint
+ * gtk_constraint_get_source_attribute: (attributes org.gtk.Method.get_property=source-attribute)
+ * @constraint: a `GtkConstraint`
*
- * Retrieves the attribute of the source to be read by the @constraint.
+ * Retrieves the attribute of the source to be read by the constraint.
*
- * Returns: the target's attribute
+ * Returns: the source's attribute
*/
GtkConstraintAttribute
gtk_constraint_get_source_attribute (GtkConstraint *constraint)
}
/**
- * gtk_constraint_get_relation:
- * @constraint: a #GtkConstraint
+ * gtk_constraint_get_relation: (attributes org.gtk.Method.get_property=relation)
+ * @constraint: a `GtkConstraint`
*
- * The order relation between the terms of the @constraint.
+ * The order relation between the terms of the constraint.
*
- * Returns: a #GtkConstraintRelation value
+ * Returns: a relation type
*/
GtkConstraintRelation
gtk_constraint_get_relation (GtkConstraint *constraint)
}
/**
- * gtk_constraint_get_multiplier:
- * @constraint: a #GtkConstraint
+ * gtk_constraint_get_multiplier: (attributes org.gtk.Method.get_property=multiplier)
+ * @constraint: a `GtkConstraint`
*
* Retrieves the multiplication factor applied to the source
* attribute's value.
}
/**
- * gtk_constraint_get_constant:
- * @constraint: a #GtkConstraint
+ * gtk_constraint_get_constant: (attributes org.gtk.Method.get_property=constant)
+ * @constraint: a `GtkConstraint`
*
* Retrieves the constant factor added to the source attributes' value.
*
}
/**
- * gtk_constraint_get_strength:
- * @constraint: a #GtkConstraint
+ * gtk_constraint_get_strength: (attributes org.gtk.Method.get_property=strength)
+ * @constraint: a `GtkConstraint`
*
* Retrieves the strength of the constraint.
*
- * Returns: the strength of the constraint
+ * Returns: the strength value
*/
int
gtk_constraint_get_strength (GtkConstraint *constraint)
/**
* gtk_constraint_is_required:
- * @constraint: a #GtkConstraint
+ * @constraint: a `GtkConstraint`
*
- * Checks whether the @constraint is a required relation for solving the
+ * Checks whether the constraint is a required relation for solving the
* constraint layout.
*
* Returns: %TRUE if the constraint is required
/**
* gtk_constraint_is_attached:
- * @constraint: a #GtkConstraint
+ * @constraint: a `GtkConstraint`
*
- * Checks whether the @constraint is attached to a #GtkConstraintLayout,
+ * Checks whether the constraint is attached to a [class@Gtk.ConstraintLayout],
* and it is contributing to the layout.
*
- * Returns: %TRUE if the constraint is attached
+ * Returns: `TRUE` if the constraint is attached
*/
gboolean
gtk_constraint_is_attached (GtkConstraint *constraint)
/**
* gtk_constraint_is_constant:
- * @constraint: a #GtkConstraint
+ * @constraint: a `GtkConstraint`
*
- * Checks whether the @constraint describes a relation between an attribute
- * on the #GtkConstraint:target and a constant value.
+ * Checks whether the constraint describes a relation between an attribute
+ * on the [property@Gtk.Constraint:target] and a constant value.
*
- * Returns: %TRUE if the constraint is a constant relation
+ * Returns: `TRUE` if the constraint is a constant relation
*/
gboolean
gtk_constraint_is_constant (GtkConstraint *constraint)